import '@fortawesome/fontawesome-free/css/all.min.css' //放在最前面,避免被覆盖
import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { useThemeStore } from './stores/darkTheme'

import App from './App-dark2.vue'
import router from './router'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入 Element Plus 暗黑模式样式
import 'element-plus/theme-chalk/dark/css-vars.css'

const app = createApp(App)

app.use(createPinia())
app.use(router)

// 初始化主题（确保页面加载时主题生效）
const themeStore = useThemeStore()
themeStore.initTheme()
// themeStore.updateHtmlClass()

app.use(ElementPlus)

app.mount('#app')
